

package com.hazelcast.nio.serialization;

/**
 * Allows to intercept class resolution during deserialization based on class name. It's used as a validation mechanism in
 * Look-ahead ObjectInputStream.
 */
public interface ClassNameFilter {

    /**
     * Called from {@link java.io.ObjectInputStream#resolveClass}. When the deserialization should not be allowed the method
     * throws a {@link RuntimeException}.
     *
     * @param className name of class to be deserialized
     */
    void filter(String className);
}
